﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web;
using System.Web.Security;


/// <summary>
/// Summary description for PermissionHelper
/// </summary>
public static class PermissionHelper
{
    public static bool HasPermission(string userName, string permission)
    {
        bool hasPermission = false;
        try
        {
            hasPermission = Roles.IsUserInRole(userName, permission);
        }
        catch { }
        return hasPermission;
    }
}